package com.imooc.enums;

import lombok.Getter;

@Getter
public enum ResultEnum {

    SUCCESS(0, "成功"),
    PARAM_ERROR(1, "参数错误"),
    PRODUCT_NOT_EXIST(10, "商品不存在"),
    PRODUCT_STOCL_ERROR(11, "商品库存不正确"),
    ORDER_NOT_EXIST(12, "订单不存在"),
    ORDERDETAIL_NOT_EXIST(13,"该商品不存在"),
    ORDER_STATUS_EROR(14,"订单状态错误"),
    UPDATE_ORDER_ERROR(15,"订单更新失败"),
    ORDER_PAY_STATUS_ERROR(16,"订单状态错误"),
    UPDATE_PAYSTATUS_ERROR(17,"更新支付状态失败"),
    ORDER_UPDATE_FAIL(18,"订单更新失败"),
    CART_EMPTY(19,"购物车为空"),
    ORDER_DETAIL_EMPTY(20,"商品详情不能为空"),
    ORDER_OWNER_ERROR(21, "你没有权限查看该商品"),
    WECHAT_MP_ERROR(22, "微信授权错误"),
    ORDER_CANCEL_ERROR(23, "订单取消错误"),
    ORDER_CANCEL_SUCCESS(24, "订单取消成功"),
    LOGIN_FAIL(25, " 登陆失败！"),
    LOGIN_SUCCESS(26,"登陆成功！"),
    LOGOUT_SUCCESS(27,"登出成功"),
    ;

    private Integer code;
    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


}
